package com.woniu.aimd.config.ai.tools;

import com.woniu.aimd.pojo.DTO.NodeBaseInfo;
import com.woniu.aimd.pojo.entity.Node;
import com.woniu.aimd.service.NodeService;
import jakarta.annotation.Resource;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ServiceTools {
@Resource
private NodeService nodeService;
@Tool(description = "根据标题获取文档内容")
public Node getNodeInfo(@ToolParam(description ="题目名字") String title,@ToolParam(description ="班级id") String classId){

    return  nodeService.getCurrentNodeByTitle(title,classId);
 }
}

